package ibm.websphere.monitor.bean;

import java.util.List;

/**
 * Created by zhouyang on 2016/1/14.
 */
public class JvmInfo implements java.io.Serializable {

    private Long id;

    /**JVM的CPU使用情况**/
    private Long ProcessCpuUsage;

    /**JVM已经运行的时间数 秒为单位**/
    private Long UpTime;

    /**JVM运行时中的使用内存容量**/
    private Long UsedMemory;

    /**JVM运行时的总内存**/
    private Long HeapSize;

    /**JVM运行时的空闲内存**/
    private Long FreeMemory;

    /**采集数据的时间**/
    private String currentDate;

    /**采集数据的SERVER名**/
    private String serverName;

    public JvmInfo(){}

    public JvmInfo(Long id, Long processCpuUsage, Long upTime, Long usedMemory, Long heapSize, Long freeMemory, String currentDate, String serverName) {
        this.id = id;
        ProcessCpuUsage = processCpuUsage;
        UpTime = upTime;
        UsedMemory = usedMemory;
        HeapSize = heapSize;
        FreeMemory = freeMemory;
        this.currentDate = currentDate;
        this.serverName = serverName;
    }

    public JvmInfo(List arrayList) {
        this.id = Long.parseLong(arrayList.get(0).toString());
        ProcessCpuUsage = Long.parseLong(arrayList.get(1).toString());
        UpTime = Long.parseLong(arrayList.get(2).toString());
        UsedMemory = Long.parseLong(arrayList.get(3).toString());
        HeapSize = Long.parseLong(arrayList.get(4).toString());
        FreeMemory = Long.parseLong(arrayList.get(5).toString());
        this.currentDate = arrayList.get(6).toString();
        this.serverName = arrayList.get(7).toString();
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProcessCpuUsage() {
        return ProcessCpuUsage;
    }

    public void setProcessCpuUsage(Long processCpuUsage) {
        ProcessCpuUsage = processCpuUsage;
    }

    public Long getUpTime() {
        return UpTime;
    }

    public void setUpTime(Long upTime) {
        UpTime = upTime;
    }

    public Long getUsedMemory() {
        return UsedMemory;
    }

    public void setUsedMemory(Long usedMemory) {
        UsedMemory = usedMemory;
    }

    public Long getHeapSize() {
        return HeapSize;
    }

    public void setHeapSize(Long heapSize) {
        HeapSize = heapSize;
    }

    public Long getFreeMemory() {
        return FreeMemory;
    }

    public void setFreeMemory(Long freeMemory) {
        FreeMemory = freeMemory;
    }

    public String getCurrentDate() {
        return currentDate;
    }

    public void setCurrentDate(String currentDate) {
        this.currentDate = currentDate;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }
}
